home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / biz / swood / FW_MEf.lha / FW_MEf / MEinfügen.fwrexx < prev    next >
Text File  |  1998-01-28  |  4KB  |  175 lines

  1. /* Optimized with RexxOpt 1.7 */
  2.  
  3. R='0A'X
  4. Dre=0
  5. Sei=0
  6. Address='FinalW'
  7. Options results
  8. STATUS PORTNAME
  9. FW=result
  10. address(FW)
  11. SIGNAL ON BREAK_C
  12. SIGNAL ON SYNTAX
  13. 'ShowMessage 1 0 "Mehrfach Einfügen V1.65 - 28.01.98" "Neu: Das FW Makro-Paket V3" "Info im Mehrfach-Einfügen-Guide" "Weiter" "Abbruch" ""'
  14. If result=2 then Exit
  15. GetDocItemPrefs Decimal
  16. Punkt=Result
  17. If Punkt="Comma" then DocItemPrefs Decimal Period
  18. GraphicTool
  19. nr=1
  20. CurrentObject
  21. ObjectId=Result
  22. IF ObjectId=0 THEN;do
  23. 'ShowMessage 1 1 "Fehler:" "Kein Grafikobjekt ausgewählt..." "" "Abbruch" "" ""'
  24. Call BREAK_C
  25. End
  26. Objekt.0=nr;Objekt.nr=ObjectID
  27. FirstObject Selected
  28. ID=result
  29. Call Zaehlen
  30. Do While 1
  31. NextObject ID Selected
  32. ID=result
  33. If ID=0 then Leave
  34. Call Zaehlen
  35. End
  36. If Objekt.0=1 then;do
  37. gruppe=false
  38. end
  39. else gruppe=true
  40. Do a=2 to Objekt.0
  41. SelectObject Objekt.a MULTIPLE
  42. End
  43. SelectObject Objekt.1 MULTIPLE
  44. STATUS View
  45. Zoom=result
  46. STATUS Pages
  47. Seiten=result
  48. STATUS Page
  49. Seite=result
  50. If Gruppe=true then Group
  51. Copy
  52. IF RC=0 THEN;do
  53. CurrentObject
  54. ObjectID=result
  55. GetObjectCoords ObjectID
  56. Parse var result Seite x y w h
  57. wl=w
  58. hl=h
  59. GetObjectRotation ObjectID
  60. Dreh=result
  61. GetObjectType ObjectID
  62. Typ=result
  63. If Gruppe=true then Ungroup
  64. 'ShowMessage 2 0 "Wie soll die Bildschirmausgabe erfolgen?" "" "" "Normal" "Schnell" ""'
  65. ba=result
  66. Do While 1
  67. Result="ß"
  68. RequestText '"Mehrfach Einfügen" "Anzahl der Kopien" ""'
  69. Anzahl=Result
  70. If Anzahl="ß" then call BREAK_C
  71. If Anzahl=""|Anzahl=0 then call Ende
  72. If Datatype(Anzahl,'W')=1 then leave
  73. else call oops
  74. End
  75. Do while 1
  76. Result="ß"
  77. RequestText '"Mehrfach Einfügen" "Horizontale Verschiebung in cm" ""'
  78. Hor=Result
  79. If Hor="ß" then call BREAK_C
  80. If Hor="" then Hor=0
  81. If Datatype(Hor,'N')=1 then leave
  82. else call oops1
  83. End
  84. Do while 1
  85. Result="ß"
  86. RequestText '"Mehrfach Einfügen" "Vertikale Verschiebung in cm" ""'
  87. Ver=Result
  88. If Ver="ß" then call BREAK_C
  89. If Ver="" then Ver=0
  90. If Datatype(Ver,'N')=1 then leave
  91. else call oops1
  92. End
  93. Do while 1
  94. Result="ß"
  95. RequestText '"Mehrfach Einfügen" "Drehung in Grad" ""'
  96. Dre=Result
  97. If Dre="ß" then call BREAK_C
  98. If Dre="" then Dre=0
  99. If Datatype(Dre,'W')=1 then leave
  100. else call oops
  101. End
  102. Do While 1
  103. Result="ß"
  104. RequestText '"Mehrfach Einfügen" "Auf welche Seite? 0=dieselbe Seite" ""'
  105. Sei=Result
  106. If Sei="ß" then call BREAK_C
  107. If Sei=""|Sei=0 then Sei=Seite
  108. If Datatype(Sei,'W')=1 then leave
  109. else call oops
  110. End
  111. If ba=2 then View 400
  112. Do a=1 to (Sei-Seiten)
  113. InsertPageBreak
  114. End
  115. Do i=1 TO Anzahl
  116. Paste
  117. CurrentObject
  118. ObjectID=Result
  119. a=x+(Hor*i)
  120. b=y+(Ver*i)
  121. Winkel=Dreh+Dre*i
  122. If Typ=2|Typ=3 then;do
  123. GetPageSetup HEIGHT
  124. Pagehoehe=result
  125. w=wl+(Hor*i)
  126. h=hl+(Ver*i)
  127. If Sei~=1 then h=h+(sei-1)*Pagehoehe
  128. End
  129. SetObjectCoords ObjectID Sei a b w h
  130. SetObjectRotation ObjectID Winkel
  131. If Gruppe=true then Ungroup
  132. End
  133. End
  134. If Sei~=Seite then GotoPage Sei
  135. Call WH
  136. Redraw
  137. 'ShowMessage 1 1 "Vielen Dank für die Benutzung." "© Heiko Schröder" "http://yi.com/home/SchroederHeiko" "Klick" "" ""'
  138. Exit
  139. ENDE:
  140. Call WH
  141. 'ShowMessage 1 1 "Falsche Anzahl an Kopien..." "" "" "Abbruch" "" ""'
  142. EXIT
  143. SYNTAX:
  144. Call WH
  145. 'ShowMessage 1 1 "Es ist ein Fehler aufgetreten." "Nähere Info in Datei «Ram:Fehler«" "" "Was?" "Gibts nicht!" "Sofort melden"'
  146. address "REXX"
  147. Open("F","Ram:Fehler","W")
  148. writeln("F","ACHTUNG! FW_MEf V1.65 Makro-Fehler"||R)
  149. writeln("F",'Fehler in Zeile' SIGL ':' ERRORTEXT(RC)||R)
  150. writeln("F",'Bitte informieren Sie den Autor unter age@thepentagon.com')
  151. Close("F")
  152. EXIT
  153. BREAK_C:
  154. Call WH
  155. 'ShowMessage 1 1 "Sie haben abgebrochen..." "© Heiko Schröder" "http://yi.com/home/SchroederHeiko" "Okay" "" ""'
  156. EXIT
  157. WH:
  158. If ba=2 then;do
  159. View Zoom
  160. GoToPage Sei
  161. End
  162. If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  163. Return
  164. Zaehlen:
  165. If ID~=Objekt.1 then;do
  166. nr=nr+1
  167. Objekt.0=nr;Objekt.nr=ID
  168. End
  169. Return
  170. oops:
  171. 'ShowMessage 1 1 "Falsche Eingabe!" "Bitte ganzzahlige Eingabe!" "" "Okay" "" ""'
  172. return
  173. oops1:
  174. 'ShowMessage 1 1 "Falsche Eingabe!" "Bitte numerische Eingabe mit (.) !" "" "Okay" "" ""'
  175. return